package practice2;


import utils.array.Queue;

/**
 * @author Tara
 * @implNote  测试实现队列，通过循环数组实现
 */
public class Pra7 {
    public static void main(String[] args) {

        Queue queue = new Queue(7);
        System.out.println("初始化=="+ queue);
        System.out.println("填充的值为：");
        for (int i = 0; i < 7; i++) {
            queue.push(i+3);
            System.out.print(i+3+",");
        }
        System.out.println("");
        System.out.print("移除的元素为：");
        for (int i = 0; i < 2; i++) {
            System.out.print(queue.pop()+",");
        }
        System.out.println("");
        System.out.println("移除之后的队列"+ queue);
        System.out.print("新增的两个元素：");
        for (int i = 0; i < 2; i++) {
            queue.push(10+i);
            System.out.print(10+i+"，");
        }
        System.out.println("");
        System.out.println("新增2个元素之后的队列："+ queue);
    }

}
